/*
	Created: Jonathan Turner
		On : 10/18/2013
Description: Get all company employees
	Updates:
*/

ALTER PROCEDURE daycare.GetEmployees
AS 
  SELECT  EmployeeId
        , FirstName
        , LastName
        , PhoneNumber
        , EmailAddress
        , IsEmployed
        , emp.ImageId
        , usr.UserName
        , img.FileName
  FROM    daycare.Employees AS emp
  INNER JOIN dbo.aspnet_Profile AS pro ON CONVERT(VARCHAR(10),emp.EmployeeId) LIKE pro.PropertyValuesString
  INNER JOIN dbo.aspnet_Users AS usr ON pro.UserId = usr.UserId
  INNER JOIN daycare.Images AS img ON emp.ImageId = img.ImageId
  ORDER BY Firstname
        , LastName
  
  GO
